#include "comm.hpp"

using namespace std;

int main()
{
    int fd = open(FIFO_FILE, O_WRONLY);
    if (fd < 0)
    {
        perror("open");
        exit(FIFO_OPEN_ERR);
    }
    // cout << "clinet open file done!\n";

    std::string str;
    while (true)
    {
        printf("Please Enter@ ");
        getline(cin, str);
        write(fd, str.c_str(), str.size());
    }

    close(fd);
    return 0;
}